#include <iostream>
#include <Windows.h>
#include <ctime>
using namespace std;
int main17_1demo()
{//猜数字
	SetConsoleOutputCP(65001);
	srand((unsigned int)time(NULL));//添加随机数种子
	int num = rand() % 100 + 1;
	int temp = 0;
	while (true)
	{
		cout << "请输入0~100中您猜测的数字:";
		cin >> temp;
		if (temp > num)
		{
			cout << "猜测过大" << endl;
		}
		else if (temp < num)
		{
			cout << "猜测过小" << endl;
		}
		else
		{
			cout << "恭喜您猜对了" << endl;
			break;
		}
	}
	system("pause");
	return 0;
}
int main17_1()
{
	SetConsoleOutputCP(65001);
	int num = 0;
	while (num < 10)
	{
		cout << "num = " << num << endl;
		num++;
	}
	system("pause");
	return 0;
}